﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management;
using System.Text;
using WMI.NET.Abstracts;
using WMI.NET.CIM;

namespace WMI.NET.ComputerSystemHardware.CoolingDevice
{
    /// <summary>
    /// The Win32_HeatPipe WMI class represents the properties of a heat pipe cooling device.
    /// </summary>
    public class Win32_HeatPipe : CIM_HeatPipe
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public Win32_HeatPipe(ManagementBaseObject mbo)
            : base(mbo)
        {

        }

    }

    /// <summary>
    /// 
    /// </summary>
    public class GetWin32_HeatPipes : Win32Collection<Win32_HeatPipe>
    {

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override ReadOnlyCollection<Win32_HeatPipe> GetCollection()
        {
            List<Win32_HeatPipe> tempCollection = new List<Win32_HeatPipe>();

            foreach (var s in searcher.Get())
            {
                Win32_HeatPipe tempListItem = new Win32_HeatPipe(s);
                tempCollection.Add(tempListItem);
            }

            return tempCollection.AsReadOnly();
        }

        /// <summary>
        /// 
        /// </summary>
        public GetWin32_HeatPipes() : base("SELECT * FROM Win32_HeatPipe") { }

    }
}
